themingengine: Remove hack to draw backgrounds instead of checks
authorBenjamin Otte <otte@redhat.com>
Thu, 7 Aug 2014 13:36:09 +0000 (15:36 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 16 Aug 2014 14:34:15 +0000 (16:34 +0200)
This was a hack we added in early 3.x to allow themes to customize their
checkmarks.
Now that we want to properly support real backgrounds everywhere,
supporting this feature would cause double draws of backgrounds.

gtk/gtkthemingengine.c

index 70a8de2f274b7b66729fb1bd22fac03d4f5af284..1e5278499a254fa8d538948e1469aaa11d968d6b 100644 (file)
@@ -1088,22 +1088,10 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
   GtkBorderStyle border_style;
   GtkBorder border;
   gint border_width;
-  GtkThemingBackground bg;
 
   if (render_icon_image (engine, cr, x, y, width, height))
     return;
 
-  _gtk_theming_background_init (&bg, engine, 
-                                x, y,
-                                width, height,
-                                gtk_theming_engine_get_junction_sides (engine));
-
-  if (_gtk_theming_background_has_background_image (&bg))
-    {
-      _gtk_theming_background_render (&bg, cr);
-      return;
-    }
-
   flags = gtk_theming_engine_get_state (engine);
   cairo_save (cr);
 
@@ -1213,22 +1201,10 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
   gint exterior_size, interior_size, pad, thickness, border_width;
   GtkBorderStyle border_style;
   GtkBorder border;
-  GtkThemingBackground bg;
 
   if (render_icon_image (engine, cr, x, y, width, height))
     return;
 
-  _gtk_theming_background_init (&bg, engine, 
-                                x, y,
-                                width, height,
-                                gtk_theming_engine_get_junction_sides (engine));
-
-  if (_gtk_theming_background_has_background_image (&bg))
-    {
-      _gtk_theming_background_render (&bg, cr);
-      return;
-    }
-
   flags = gtk_theming_engine_get_state (engine);
 
   cairo_save (cr);
@@ -2632,23 +2608,10 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
                                     gdouble           width,
                                     gdouble           height)
 {
-  GtkThemingBackground bg;
-  
   if (render_icon_image (engine, cr, x, y, width, height))
     return;
 
-  _gtk_theming_background_init (&bg, engine, x, y, width, height, 0);
-  
-  if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_SPINNER) &&
-      !_gtk_theming_background_has_background_image (&bg))
-    {
-      render_spinner (engine, cr, x, y, width, height);
-    }
-  else
-    {
-      _gtk_theming_background_render (&bg, cr);
-      gtk_theming_engine_render_frame (engine, cr, x, y, width, height);
-    }
+  render_spinner (engine, cr, x, y, width, height);
 }
 
 static GdkPixbuf *